<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Model_category extends MY_Model { 
	protected $offset = 0;
	protected $limit = 30;
	function __construct() {
		parent::__construct();
	}
	function get_all()
	{
		return $this->db->limit($this->limit, $this->offset)
			 	 ->get('category')
				 ->result_array();
	}
	function get($id='')
	{
		return $this->db->get_where('category', array('id' => $id))->row_array();
	}
}